<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let target = {
            name: 'Tom',
            age: 24
        }
        let handler = {
            has: function () {
                console.log("has");
                // todo 自定义逻辑
            },
            deleteProperty: function () {
                console.log("deleteProperty");
                // todo 自定义逻辑
            }

        }
        let proxy = new Proxy(target, handler);

        console.log("age" in proxy);
        delete proxy.age;
    </script>
</body>

</html>